From: Andrew Cooper Date: Thu, 10 Dec 2015 16:25:18 +0000 (+0100) Subject: VT-d: Correct order of parameters to memset() in setup_posted_irte() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2099 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=e6f0e099d2c17de47fd86e817b1998db903cab61;p=xen.git VT-d: Correct order of parameters to memset() in setup_posted_irte() Introduced in c/s 83ea9229 "vt-d: add API to update IRTE when VT-d PI is used". Spotted by Coverity. Signed-off-by: Andrew Cooper --- diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index 0a48cd429c..0ee3fb2d0f 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -910,7 +910,7 @@ static void setup_posted_irte( struct iremap_entry *new_ire, const struct iremap_entry *old_ire, const struct pi_desc *pi_desc, const uint8_t gvec) { - memset(new_ire, sizeof(*new_ire), 0); + memset(new_ire, 0, sizeof(*new_ire)); /* * 'im' filed decides whether the irte is in posted format (with value 1)